import React, { Component } from 'react';
import { glabalContext } from './common/js/globalData'
const { Consumer } = glabalContext
class TransferToChild1 extends Component {
    render() { 
        return (<div>
        
        子组件child2: （我和child1是兄弟）
        {/* 也读取父组件的role数据 */}
        <Consumer>
           {
             value => (<div>{value.role}</div>)
           }
        </Consumer>
        </div>);

    }
}
 
export default TransferToChild1;